package com.eyas.im.common.datasource.impl;

import java.util.HashSet;
import java.util.Iterator;

public class IgnoreCaseHashSet extends HashSet<String> {
    @Override
    public boolean contains(Object o) {
        Iterator<String> it = iterator();
        if (o==null) {
            while (it.hasNext())
                if (it.next()==null)
                    return true;
        } else {
            while (it.hasNext())
                if (o.toString().equalsIgnoreCase(it.next()))
                    return true;
        }
        return false;
    }
}
